Everything about Computer Crash totally explained
A
crash in
computing is a condition where a program (either an
application or part of the
operating system) stops performing its expected function and also stops responding to other parts of the system. Often the offending program may simply appear to
freeze. If this program is a critical part of the operating system
kernel the entire computer may crash (a
system crash).
Many crashes are the result of the execution of a single machine
instruction, but the causes of this are manifold. Typical causes are when the
program counter is set to an incorrect address or a
buffer overflow overwrites a portion of program code due to an earlier
bug. In either case, it's quite common for the
processor to attempt to execute data or random memory values. Since all data values are possible but only some values are valid instructions, this often results in an illegal instruction exception. By chance such data or random values could be valid (though unplanned) instructions. If while successfully executing such instructions the processor happens onto a branch instruction that moves the program counter back a few bytes it would simply repeat those few instructions over and over, being stuck in an
endless loop. One might say that the original bug that upset the program counter "caused" the crash, but the actual fault was an illegal instruction or endless loop some time later. The art of
debugging such crashes is connecting the actual cause of the crash (easily determined) with the code that set off the chain of events. This is often very far from obvious—the original bug is usually perfectly valid code from the processor's perspective.
On earlier personal computers, it was actually possible to cause hardware damage through trying to write to hardware addresses outside of the system's main memory. Occasionally, execution of arbitrary data on a system will result in a breakup of screen display. This is widely considered a severe system crash.
Another cause of crashes is a
race condition in communication between
processes. One process may send a
signal to a second process then stop execution until it receives a response. If the second process is busy the signal will be forced to wait until the process can get to it. However, if the second process was busy sending a signal to the first process then both processes would wait forever for the other to respond to signals and never see the other’s signal. If the processes are
uninterruptible that'll
hang and have to be shut down. If at least one of the processes is a critical
kernel process the whole system may crash and have to be restarted.
Etymology
The term "crash" may originate in the phrase "
head crash" which would occur when the
read/write heads in a
hard disk would physically come into contact with (for example, crash into) the disk surface. The result of this would usually be that the computer would freeze up.
Application crashes
An
application typically crashes when it performs an operation which isn't allowed by the operating system. The operating system then shuts down the application.
Typical errors that result in application crashes include:
- attempting to read or write memory that isn't allocated for reading or writing by that application (general protection fault)
- attempting to execute privileged or invalid instructions
- unforeseen circumstances or poor code writing that results in the program executing an endless loop
- attempting to perform I/O operations on hardware devices to which it doesn't have permission to access
- passing invalid arguments to system calls
- attempting to access other system resources to which the application doesn't have permission to access (bus error)
Website server crashes
The software running the
server behind a
website may crash, rendering it inaccessible entirely or providing only an error message instead of normal content.
Operating system crashes
An operating system crash commonly occurs when an
hardware exception occurs that can't be
handled. Operating system crashes can also occur when internal
sanity-checking logic within the operating system detects that the operating system has lost its
internal self-consistency.
In an ideal world, well-written operating systems would always remain stable even when individual applications crash. Vendors such as
Microsoft and
Apple frequently market their operating systems as being intrinsically crash-resistant such that should an application crash the operating system remains unharmed.
Further Information
Get more info on 'Computer Crash'.
|
External Link Exchanges
Do you know how hard it is to get a link from a large encyclopaedia? Well we're different and will prove it. To get a link from us just add the following HTML to your site on a relevant page:
<a href="http://crash__computing.totallyexplained.com">Crash (computing) Totally Explained</a>
Then simply click through this link from your web page. Our crawlers will verify your link, extract the title of your web page and instantly add a link back to it. If you like you can remove the words Totally Explained and embed the link in article text.
As long as your link remains in place, we'll keep our link to you right here. Please play fair - our crawlers are watching. Your site must be closely related to this one's topic. Any kind of spamming, dubious practises or removing the link will result in your link from us being dropped and, potentially, your whole site being banned. |